import request from '@/utils/request'

export function getUserCenter(header ?: any) {
	return request.get({ url: '/user/center', header })
}

// 个人信息
export function getUserInfo() {
	return request.get({ url: '/user/info' }, { isAuth: true })
}

// 个人编辑
export function userEdit(data : any) {
	return request.post({ url: '/user/setInfo', data }, { isAuth: true })
}

// 绑定手机
export function userBindMobile(data : any, header ?: any) {
	return request.post({ url: '/user/bindMobile', data, header }, { isAuth: true })
}

// 微信电话
export function userMnpMobile(data : any, header ?: any) {
	return request.post({ url: '/user/getMobileByMnp', data, header }, { isAuth: true })
}

// 更改手机号
export function userChangePwd(data : any) {
	return request.post({ url: '/user/changePassword', data }, { isAuth: true })
}

//忘记密码
export function forgotPassword(data : Record<string, any>) {
	return request.post({ url: '/user/resetPassword', data })
}

//余额明细
export function accountLog(data : any) {
	return request.get({ url: '/account_log/lists', data })
}




// S 提现

// 提现配置
export function apiWithdrawGetConfig(data : any) {
	return request.get({ url: '/withdraw/getConfig', data })
}

// 提现申请
export function apiWithdrawApply(data : any) {
	return request.post({ url: '/withdraw/apply', data })
}

// 提现申请列表
export function apiWithdrawLists(data : any) {
	return request.get({ url: '/withdraw/lists', data })
}

// 提现详情
export function apiWithdrawDetail(data : any) {
	return request.get({ url: '/withdraw/detail', data })
}

export function apiWalletData(data : any) {
	return request.get({ url: '/user/wallet', data })
}


// E 提现



// S  地址
// 获取地址列表
export function apiAddressLists() {
	return request.get({ url: '/user_address/lists' })
}

// 获取地址详情

export function apiAddressDetail(data : any) {
	return request.get({ url: '/user_address/detail', data })
}

// 添加收货地址
export function apiAddressAdd(data : any) {
	return request.post({ url: '/user_address/add', data })
}


// 编辑收货地址
export function apiAddressEdit(data : any) {
	return request.post({ url: '/user_address/edit', data })
}

// 设置默认收货地址
export function apiAddressEditDefault(data : any) {
	return request.post({ url: '/user_address/setDefault', data })
}

// 删除收货地址
export function apiAddressDel(data : any) {
	return request.post({ url: '/user_address/del', data })
}

// 微信导入收货地址转ID


export function apiAddresshandleRegion(data : any) {
	return request.post({ url: '/user_address/handleRegion', data })
}

export function userBill(data : any) {
	return request.get({ url: '/account_log/lists', data })
}


export function submitFeedback(data : any) {
	return request.post({ url: '/user/submitFeedback', data })
}


export function submitCooperation(data : any) {
	return request.post({ url: '/user/submitCooperation', data })
}


export function integrallog(data : any) {
	return request.get({ url: '/Integrallog/lists', data })
}

export function integralAllLog(data : any) {
	return request.get({ url: '/Integrallog/allLists', data })
}